package com.fauks.ssm.springbyanno.bean;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

/**
 * 通过实现两个接口指定Bean的生命周期
 */
public class Color implements InitializingBean, DisposableBean {
    @Override
    public void destroy() throws Exception {
        System.out.println("Color destroy");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("Color afterPropertiesSet");
    }
}
